﻿using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    public partial class K0015
    {
        public K0015()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            LMS = "/m";
            InitializeComponent();
            SDSA = "0015"; 
        }
        public override void LOADBYAUF()
        {
            base.LOADBYAUF();

        }
        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return; 
            base.Window_Loaded(sender, e);
            filter = "SDDATEN LIKE '%"+ LMS +"%' AND SDKEY LIKE '%V'";
            rows=TBMain.Select(filter);
            
            foreach (DataRow row in rows)
            { 
                string DES = row["DES"].ToString().Trim();
                row["DES"] = Helpers.Helper.Convert8859P1ToGB2312(DES).Replace("粗纱定量", "").Replace("g/m", "");
             }
            if (rows.Length == 0)
                return;
            DataTable TB = rows.CopyToDataTable();
            TBMain.Clear();
            TBMain.Merge(TB);
            TBMain.AcceptChanges();
          
        }
    }
}
